From 018ff591b796e161308242986f8d42e3ed0f7d38 Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 31 Oct 2010 19:31:26 +0000 Subject: [PATCH] In the GUI, ensure that all binary options appear on the command. This is especially useful in KML where we have many options that default to true and previously had no way to turn them off. --- gpsbabel/gui/mainwindow.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gpsbabel/gui/mainwindow.cpp b/gpsbabel/gui/mainwindow.cpp index 26a03152f..d28d87952 100644 --- a/gpsbabel/gui/mainwindow.cpp +++ b/gpsbabel/gui/mainwindow.cpp @@ -1,5 +1,5 @@ // -*- C++ -*- -// $Id: mainwindow.cpp,v 1.25 2010-09-02 03:10:46 robertl Exp $ +// $Id: mainwindow.cpp,v 1.26 2010-10-31 19:31:26 robertl Exp $ //------------------------------------------------------------------------ // // Copyright (C) 2009 S. Khai Mong . @@ -111,8 +111,14 @@ static QString MakeOptions(const QList& options) if (options[i].getSelected()) { str += ","; str += options[i].getName(); - if (options[i].getType() != FormatOption::OPTbool) { - str += "=" + options[i].getValue().toString(); + if (options[i].getType() == FormatOption::OPTbool) { + str += "=1"; + } else { + str += "=" + options[i].getValue().toString(); + } + } else { + if (options[i].getType() == FormatOption::OPTbool) { + str += "," + options[i].getName() + "=0"; } } } -- 2.30.2